package ae.pcfc.cldos.online.common.strategy.mail.sender.provider;

import ae.pcfc.cldos.online.common.clddb.domain.AppMetaData;
import ae.pcfc.cldos.online.common.strategy.mail.sender.BaseEmailBuilder;
import ae.pcfc.cldos.online.common.strategy.mail.sender.IEmailSender;
import ae.pcfc.cldos.online.common.strategy.mail.sender.MailToCompanySenderThread;
import ae.pcfc.cldos.online.gs.service.client.vo.NotificationVO;

/**
 * 
 * @author arosa
 *
 */
public class GeneralAdminCancelMailStrategy extends BaseEmailBuilder implements IEmailSender {

	public void sendEmail(AppMetaData appMetaData, NotificationVO notificationVO){
		notificationVO.setSubject(subject);
		notificationVO.setSubjectAr(subjectAr);
		try{
			notificationVO.setMessage(
					ftlProcessorManager.processFtlTemplate(templateName, notificationVO.getParameters()));
			notificationVO.setMessageAr(
					ftlProcessorManager.processFtlTemplate(templateName+"_ar", notificationVO.getParameters()));
		} catch (Exception e) {
			e.printStackTrace();
		}
		MailToCompanySenderThread mailToCompanySenderThread = new MailToCompanySenderThread(govtSysGS, notificationVO,fileStorageManager);
		mailToCompanySenderThread.start();
	}

}
